package com.gitee.zhengjiasen.dp.state.demo1;

public class StateOn extends StateBubble {

    private Bubble bubble;

    public StateOn(Bubble bubble) {
        super.describe = "电灯开启";
        this.bubble = bubble;
    }

    @Override
    public void on() {
        System.out.println("bubble 已经 on");
    }

    @Override
    public void off() {
        System.out.println("bubble off");
        bubble.setStateBubble(bubble.getStateOff());
    }
}
